package CarRental;

//汽车类
public abstract class Automobile {
    private String licensePlate, brand;//车牌，品牌，车型,
    private double dailyRent;//日租金
    private boolean state = true;//当前状态

    public Automobile() {
    }

    public Automobile(String licensePlate, String brand, double dailyRent) {
        this.licensePlate = licensePlate;
        this.brand = brand;
        this.dailyRent = dailyRent;
    }
    public abstract double calculate(int day);//计算租金
    public abstract void showCar();

    @Override
    public String toString() {
        return "车牌：" + licensePlate + '\'' +
                "品牌" + brand + '\'' +
                "日租金" + dailyRent + "实时状态：" + (state ? "可租" : "已租出");
    }

    public String getLicensePlate() {
        return licensePlate;
    }

    public void setLicensePlate(String licensePlate) {
        this.licensePlate = licensePlate;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getDailyRent() {
        return dailyRent;
    }

    public void setDailyRent(double dailyRent) {
        this.dailyRent = dailyRent;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }


}
